package org.example.questionnairebackend.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.questionnairebackend.Data.Submissions;
import org.example.questionnairebackend.Data.Surveys;
import org.example.questionnairebackend.Dto.QuestionOptionDTO;

import java.util.List;

@Mapper
public interface SurveysMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Surveys record);

    int insertSelective(Surveys record);

    Surveys selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Surveys record);

    int updateByPrimaryKey(Surveys record);

    @Select("select * from surveys")
    List<Surveys> getAllSurveys();

    List<QuestionOptionDTO> getQuestionsWithOptions(Integer surveyId);
}
